package com.yasenagat.zkweb.ctrl;

import com.yasenagat.zkweb.entity.Customer;
import com.yasenagat.zkweb.repo.CustomerRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by qwx89 on 2018/8/5.
 */
@RestController
public class TestCtrl {

    @Autowired
    private CustomerRepository customerRepository;

    @GetMapping("getConsumer")
    public List<Customer> getCustomers(){
        return customerRepository.findAll();
    }
}
